/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.beans.fiscal;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "DETALHE_ARMAMENTO")
public class DetalheArmamento implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID")
    private Integer id;
    @Column(name = "INDICADOR_TIPO_ARMA")
    private Short indicadorTipoArma;
    @Column(name = "NUMERO_SERIE_ARMA")
    private String numeroSerieArma;
    @Column(name = "NUMERO_SERIE_CANO")
    private String numeroSerieCano;
    @Column(name = "DESCRICAO_ARMA")
    private String descricaoArma;

    public DetalheArmamento() {
    }

    public DetalheArmamento(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        Integer oldId = this.id;
        this.id = id;
        changeSupport.firePropertyChange("id", oldId, id);
    }

    public Short getIndicadorTipoArma() {
        return indicadorTipoArma;
    }

    public void setIndicadorTipoArma(Short indicadorTipoArma) {
        Short oldIndicadorTipoArma = this.indicadorTipoArma;
        this.indicadorTipoArma = indicadorTipoArma;
        changeSupport.firePropertyChange("indicadorTipoArma", oldIndicadorTipoArma, indicadorTipoArma);
    }

    public String getNumeroSerieArma() {
        return numeroSerieArma;
    }

    public void setNumeroSerieArma(String numeroSerieArma) {
        String oldNumeroSerieArma = this.numeroSerieArma;
        this.numeroSerieArma = numeroSerieArma;
        changeSupport.firePropertyChange("numeroSerieArma", oldNumeroSerieArma, numeroSerieArma);
    }

    public String getNumeroSerieCano() {
        return numeroSerieCano;
    }

    public void setNumeroSerieCano(String numeroSerieCano) {
        String oldNumeroSerieCano = this.numeroSerieCano;
        this.numeroSerieCano = numeroSerieCano;
        changeSupport.firePropertyChange("numeroSerieCano", oldNumeroSerieCano, numeroSerieCano);
    }

    public String getDescricaoArma() {
        return descricaoArma;
    }

    public void setDescricaoArma(String descricaoArma) {
        String oldDescricaoArma = this.descricaoArma;
        this.descricaoArma = descricaoArma;
        changeSupport.firePropertyChange("descricaoArma", oldDescricaoArma, descricaoArma);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetalheArmamento)) {
            return false;
        }
        DetalheArmamento other = (DetalheArmamento) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Apagar.DetalheArmamento[ id=" + id + " ]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }
    
}
